package com.kl.modular.system.service.api;

import com.kl.common.pager.PageParameter;
import com.kl.common.pager.Pager;
import com.kl.modular.system.dao.bo.SystemAdminBo;
import com.kl.modular.system.dao.model.SystemAdmin;

/**
 * 用户service业务接口
 * @author XRP_ZJB
 * @date 2016-01-15 13:41
 * @(C) XIGNSOFT Copyright 
 */
public interface ISystemAdminService {
	
	/**
	 * 用户 列表
	 */	
	public Pager<SystemAdmin> getListByBo(SystemAdminBo systemAdminBo, PageParameter pageParameter);
	
	/**
	 * 添加用户
	 */
	public void addSystemAdmin(SystemAdmin systemAdmin, String[] roles) throws Exception;
	
	/**
	 * 更新用户
	 */
	public void updateByCode(SystemAdmin systemAdmin, String[] roles) throws Exception;
	
	/**
	 * 删除用户
	 */
	public void deleteByCode(String[] codes) throws Exception;
	
	/**
	 * 获取用户
	 */
	public SystemAdmin getSystemAdminByCode(String code);
	
	/**
	 * 查询用户
	 */
	public SystemAdmin getSystemAdminByBo(SystemAdminBo systemAdminBo);

	/**
	 * 查询数
	 * @param systemAdminBo
	 * @return
	 */
	public int findAdminCountByBo(SystemAdminBo systemAdminBo);
	
	/**
	 * 更新密码
	 * @param systemAdmin
	 * @throws Exception
	 */
	public void updatePwdByCode(SystemAdmin systemAdmin) throws Exception;

	/**
	 * 更新用户状态
	 * @param systemCode
	 * @param oldStatus
	 * @param newStatus
	 */
	public void changeAdminStatusByCode(String systemCode, String oldStatus, String newStatus) throws Exception;
}